﻿using System.Collections.Generic;
using CML.Intercamber.Business.Dao;
using CML.Intercamber.Business.Model;

namespace CML.Intercamber.Web.Helpers
{
    public class EstablishmentHelper
    {

        public static List<EstablishmentsDetail> AllEstablishments
        {
            get
            {
                List<EstablishmentsDetail> data = SessionHelper.GetSessionItem(SessionHelper.SessionKeyEstablishments) as List<EstablishmentsDetail>;
                if (data == null)
                {
                    data = EstablishmentDao.ListEstablishments();
                    SessionHelper.AddSessionItem(SessionHelper.SessionKeyEstablishments, data);
                }
                return data;
            }
        } 

    }
}